﻿using System;
using System.Text.RegularExpressions;

class ParseURLAddress 
{
    static void Main()
    {
        string address = "http://www.devbg.org/forum/index.php";

        var elements = Regex.Match(address, "(.*)://(.*?)(/.*)").Groups;

        Console.WriteLine(elements[1]);
        Console.WriteLine(elements[2]);
        Console.WriteLine(elements[3]);
    }
}